<h3><?php echo $title; ?></h3>



<?php 
$row=$result[0];


echo form_open_multipart('admin/promotion/update/'.$row['id']); 

echo '<div style="color:red;text-align:center">';
if(isset($missing))
{
	
foreach ($missing as $item)
{
echo $item;
}
}

echo "</div>";
?>

<div class="control2">

<?php

	echo form_submit('update', 'Save');

	echo form_submit('close', 'Close');

?>

</div><!--control2 end-->



<div class="box">

<div style="text-align:center;font-size:12px;padding:10px;color:#006699"><h2><?php echo $this->lang->line('promotion_name'); ?></h2> </div>
<?php
		$name = unserialize($row['name']);
			
		$info = unserialize($row['content']);
	//title en
	
	echo '<div class="inner">';
	$code = "title_en";
	$label ="English";

	if (! empty($missing) && array_key_exists($code, $missing))

		echo form_label($label, '', array('class'=>'error'));

	else

		echo form_label($label);
	$data= array( 'name'=>$code,'value'=>$name['en']);
	echo form_input($data, set_value($code));

	echo '</div>';

	//title  vi

echo '<div class="inner">';
	$code = "title_vi";
	$label ="Vietnamese";

	if (! empty($missing) && array_key_exists($code, $missing))

		echo form_label($label, '', array('class'=>'error'));

	else

		echo form_label($label);
	$data= array( 'name'=>$code,'value'=>$name['vi']);
	echo form_input($data, set_value($code));


	echo '</div>';

	
?>
<div style="text-align:center;font-size:12px;padding:10px;color:#006699"><h2><?php echo $this->lang->line('promotion_detail'); ?></h2> </div>
<?php

	
		//detailed_content vietnamese
$code = "detailed_content_vi";
	$label ="Vietnamese";
	echo '<div class="inner">';

	if (! empty($missing) && array_key_exists($code, $missing))

		echo form_label($label, '', array('class'=>'error'));

	else

		echo form_label($label);

	$data = array('name' =>$code, 'id' => $code, 'value' =>html_entity_decode($info['vi'],ENT_QUOTES,"UTF-8")  );

	echo '<div class="textarea">'.form_textarea($data,set_value($code)).'</div>';

	echo '</div>';
	
	
		//detailed_content english
$code = "detailed_content_en";
	$label ="English";
	echo '<div class="inner">';

	if (! empty($missing) && array_key_exists($code, $missing))

		echo form_label($label, '', array('class'=>'error'));

	else

		echo form_label($label);

		$data = array('name' =>$code, 'id' => $code, 'value' =>html_entity_decode($info['en'],ENT_QUOTES,"UTF-8") );

	echo '<div class="textarea">'.form_textarea($data,set_value($code)).'</div>';

	echo '</div>';
	
	
	
	
?>

</div><!--end box-->



<?php

	echo form_close(); //FORM END

?>


<script type="text/javascript">

	CKEDITOR.replace("detailed_content_vi");
	CKEDITOR.replace("detailed_content_en");
	CKEDITOR.replace("detailed_content_cn");

</script>

